package cn.matezk.lianlian.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api")
@Slf4j
public class CacheController {

    @GetMapping("cacheEvict${node}")
    @CacheEvict(cacheNames = {"appKey.bind", "secretKey"}, allEntries=true)
    public void cacheEvict() {
        log.info("缓存清除成功");
    }
}
